import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect:'/home',
    component: () => import("@/views/tarbar/tarbar.vue"),
    children: [
      { path: "/home", component: () => import("@/views/home/home.vue") },
      { path: "/my", component: () => import("@/views/my/my.vue") },
    ],
  },
  {
    path: "/search",
    name: "search",
    component: () => import("@/views/search/search.vue"),
  },
  {
    path: "/play/:playid",
    name: "play",
    component: () => import("@/components/play.vue"),
    props: true,
  },
];

const router = new VueRouter({
  routes,
});

export default router;
